import request from '@/utils/request'

// 查询商户推送任务列表
export function listTaskInfo(query) {
  return request({
    url: '/merchant/taskInfo/list',
    method: 'get',
    params: query
  })
}

// 查询商户推送任务详细
export function getTaskInfo(id) {
  return request({
    url: '/merchant/taskInfo/' + id,
    method: 'get'
  })
}

// 新增商户推送任务
export function addTaskInfo(data) {
  return request({
    url: '/merchant/taskInfo',
    method: 'post',
    data: data
  })
}

// 修改商户推送任务
export function updateTaskInfo(data) {
  return request({
    url: '/merchant/taskInfo',
    method: 'put',
    data: data
  })
}

// 删除商户推送任务
export function delTaskInfo(id) {
  return request({
    url: '/merchant/taskInfo/' + id,
    method: 'delete'
  })
}


// 修改状态
export function changeTaskInfoStatus(data) {
  return request({
    url: '/merchant/taskInfo/updateStatus',
    method: 'post',
    data: data
  })
}
